<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="referrer" content="never">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title></title>
				<script src="js/jquery-2.1.0.js"></script>
		<style>
			#login_click {
				margin-top: 32px;
				height: 40px;
			}
			

			
			#login_click a:hover {
				background: #385f9e;
			}
			
		</style>
<style>
.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    width: 70%;
}
</style>
	</head>

	<body style="background-color: #808080">

		<br />
		<div id="login_click" align="center">
			<input id="khinput" placeholder="请在此处输入编号" type="text" style="width: 70%;height: auto;font-size: 22px;"/>
			<br />
			<input id="mminput" placeholder="请在此处输入激活码" type="text" style="width: 70%;height: auto;font-size: 22px;"/>
			<br /><br />
			<button id="yanzheng" class="button">激活</button>
			<br />
			<div style="width: 70%;">
			<a id="ts">请将购买的编号与激活码输入!请购买激活码支持本软件！</a>
			<br /><br />
			未激活用户最多观看50张图片！
			<br /><br />

			点击购买激活码：<br /></div><br />
			<button id="pay1"  class="button">10元7天无限制使用</button><br />
			<button id="pay3"  class="button">[限量]30元永久无限制使用+<br />专用线路，看图更爽快
			</button><br />
			

			
			
			
		</div>
		<br />
		<div id="aa" align="center">
			
		</div>
	</body>
	<script src="js/mui.min.js"></script>
			<script type="text/javascript" src="js/index1.js">
		</script>
		<script src="js/jquery-2.1.0.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
									
				$("#pay1").click(function(){
						alert("10");
						plus.runtime.openURL("www.baidu.com");						
					});
				$("#pay3").click(function(){
						plus.runtime.openURL("www.baidu.com");						
					});
				
				if(localStorage.getItem("YES")!=null){

					
					$("#ts").text("编号: "+localStorage.getItem("kahao")+" ,激活码: "+localStorage.getItem("mima"));
					$("#yanzheng").attr("disabled", "true"); //设置变灰按钮  
					$("#yanzheng").text("您已激活！")
				}
				
				$("#yanzheng").click(function(){
					$(this).text("正在验证...")
					$(this).attr("disabled", "true"); //设置变灰按钮  
					kahao=$("#khinput").val();
					mima=$("#mminput").val();
					alert(kahao+mima);
					$.getJSON("data/hm.json", function(result) {
						alert(result.length);
						var yes=false;
						for(i=0;i<result.length;i++){
							if((kahao==result[i][0])&&(mima==result[i][1])){
								yes=true;
								break;
							}
						}
						if(yes){
							localStorage.setItem("YES","yes");
							localStorage.setItem("kahao",kahao);
							localStorage.setItem("mima",mima);
							alert("验证通过！");
							alert("切换到快速线路！")
						}
						else{
							alert("验证失败！");
						}
						
					});	
					$(this).removeAttr('disabled');
					$(this).text("验证");
					window.location.reload();
				})
				
			});
			
		</script>
</html>